<template>
  <view style="padding: 30upx; line-height: 50upx" v-html="detail.tips"></view>
</template>

<script>
export default {
  data() {
    return {
      id: "",
      tType: "",
      detail: "",
    };
  },
  onLoad(options) {
    this.id = options.planId;
    this.tType = options.tType;
    this.goTips();
  },
  onReady() {
    // this.getUiStyle();
  },
  methods: {
    getUiStyle() {
      var style = plus.navigator.getUiStyle();
      if ("dark" == style) {
        console.log("当前为暗黑模式");
        uni.setTabBarStyle({
          backgroundColor: "#1B1C1E",
        });
        uni.setNavigationBarColor({
          frontColor: "#ffffff",
          backgroundColor: "#1B1C1E",
          animation: {
            duration: 400,
            timingFunc: "easeIn",
          },
        });
      } else {
        console.log("当前为普通模式");
      }
    },
    goTips() {
      let self = this;
      uni.showLoading({
        title: "加载中",
        mask: true,
      });
      setTimeout((s) => {
        uni.hideLoading();
      }, 5000);
      this.config
        .get("/adultInfo/getTips", {
          planId: this.id,
          tType: this.tType,
        })
        .then((res) => {
          uni.hideLoading();
          if (res.data.code === 200) {
            self.detail = res.data.data;
            //console.log(self.detail)
          } else {
            if (res.data.code == "-201") {
              self.config.handleError(res.data);
            } else {
              uni.showToast({
                title: self.config.handleError(res.data),
                icon: "none",
              });
            }
          }
        });
    },
  },
};
</script>

<style  scoped>
@media (prefers-color-scheme: closedark) {
  uni-page-body,
  #app {
    background-color: #1b1c1e;
    height: 100%;
  }
  .bd {
    height: 100%;
    padding-bottom: 50px;
    background-color: #1b1c1e !important;
  }

  .title {
    background-color: #000000 !important;
    color: #ccc !important;
  }

  .bd1 {
    background-color: #38383c !important;
  }

  .art {
    color: #ccc !important;
  }
  >>> span {
    background-color: #1b1c1e !important;
    color: #ccc !important;
  }
  >>> .ql-align-justify {
    background-color: #1b1c1e !important;
  }
  .t1 {
    color: #ccc !important;
  }
}
</style>
